<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>input下拉列表</title>
</head>
<body>
<div style="position: relative;">
    <input list="storm" id="select">
    <datalist id="storm">
        <option id="option1">apple</option>
        <option id="option2">banana</option>
    </datalist>
</div>
</body>
</html>